import {baseUrl} from "@/config/env";

export default () => {
    return {
        submitText: '修改',
        size: 'small',
        labelWidth: 140,
        index: true,
        page: true,
        align: "center",
        menuType: 'menu',
        menuAlign: 'center',
        menuPosition: "right",
        editBtn: true,
        addBtn: true,
        labelPosition: "top",
        column: [
            {
                label: '类别',
                span: 24,
                prop: 'groupCode',
                type: 'input',
                addDisplay: true,
            },
            {
                label: '名称',
                span: 24,
                prop: 'name',
                searchModel: "#{11}",
                search: true,
                rules: [{
                    required: true,
                    message: "请输入名称",
                    trigger: "blur"
                }]
            },
            {
                label: '数据表名',
                span: 24,
                prop: 'tableName',
                searchModel: "#{11}",
                search: true,
                rules: [{
                    required: true,
                    message: "请输入数据表名",
                    trigger: "blur"
                }],
                editDetail: true,
            },
            {
                label: '存储器',
                span: 24,
                prop: 'dataStorageType',
                type: 'select',
                editDetail: true,
                defaultIndex: 0,
                addDisabled: false,
                search: true,
                searchModel: "#{0}",
                searchSpan: 6,
                value: 'sqlTableDataStorage',
                dicUrl: `${baseUrl}/start/formEngine/form/getAllStorage`,
                dicMethod: "get",
                rules: [{
                    required: true,
                    message: "请选择数据存储器",
                    trigger: "blur"
                }],

            }, {
                label: '是否创建菜单',
                span: 24,
                prop: 'isCreateMenu',
                type: 'radio',
                value: 0,
                editDisplay: false,
                addDisplay: false,
                dicData: [
                    {label: "否", value: 0},
                    {label: "是", value: 1},
                ]
            }, {
                label: '是否同步数据库',
                span: 24,
                prop: 'isSyncDataBase',
                type: 'radio',
                value: 0,
                editDisplay: false,
                addDisplay: false,
                dicData: [
                    {label: "否", value: 0},
                    {label: "是", value: 1},
                ]
            },

        ]
    }
}
